package domain.entities;

import javax.persistence.*;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created with IntelliJ IDEA.
 * User: vgonzalez
 * Date: 05/11/12
 * Time: 13:35
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "safety_recipient", catalog = "bms")
public class SafetyRecipient {

    private Integer id;
    private Safetydocs safetydocs;
    private String name;
    private String surname;
    private String email;

    public SafetyRecipient(){
    }

    public SafetyRecipient(Safetydocs safetydocs, String name,String surname, String email){
        this.safetydocs = safetydocs;
        this.name = name;
        this.surname = surname;
        this.email = email;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @ManyToOne()
    public Safetydocs getSafetydocs() {
        return safetydocs;
    }

    public void setSafetydocs(Safetydocs safetydocs) {
        this.safetydocs = safetydocs;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }
}
